<template>
  <div class="u-p-20">
    <el-card shadow="never">
      <div slot="header">
        <span>
          <b class="u-f-16">等级列表</b>
        </span>
        <router-link :to="{name:'userLevelEdit'}" v-if="hasPerm('userLevelEdit')">
          <el-button type="danger" size="small" icon="el-icon-plus" class="u-right u-5mt" round>添加会员等级</el-button>
        </router-link>
      </div>

      <el-table :data="tableData" class="u-mt-10" v-viewer>
        <el-table-column label="id" prop="id" width="100"></el-table-column>

        <el-table-column label="等级名称" prop="name"></el-table-column>
        <el-table-column label="等级数字" prop="number"></el-table-column>
        <el-table-column label="条件" prop="condition"></el-table-column>
        <el-table-column label="操作" width="120">
          <!-- <template slot-scope="scope">
            <el-dropdown>
              <span class="el-dropdown-link">
                操作
                <i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item
                  @click.native="handleRoute(scope.row.id,'userLevelEdit')"
                  v-if="hasPerm('userLevelEdit')"
                >
                  <el-button size="mini" type="text">编辑</el-button>
                </el-dropdown-item>
                 <el-dropdown-item
                  @click.native="handleDelete(scope.row.id)"
                      v-if="hasPerm('userLeveDelBtn')">
                    <el-button
                      size="mini"
                      type="text"
                    >删除</el-button>
                  </el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </template> -->
        </el-table-column>
      </el-table>

      <div class="u-mt-20 u-text-center">
        <el-pagination
          background
          @size-change="handleSizeChange"
          @current-change="handlePageChange"
          :current-page="currentPage"
          :page-sizes="[10, 20, 30, 40, 50]"
          :page-size="limit"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
        ></el-pagination>
      </div>
    </el-card>
  </div>
</template>

<script>
import commonPage from "@/mixins/common-page";
export default {
  mixins: [commonPage],
  data() {
    return {
      apiName: "userLevel",
      queryForm: {}
    };
  },
  methods: {}
};
</script>
